import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/layout/index.vue'

Vue.use(Router)

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        name: '首页',
        hidden: true,
        meta: { title: '首页' },
      },
      {
        path: '/activity',
        component: () => import('@/views/activity/index.vue'),
        name: '页面配置',
        hidden: true,
        meta: { title: '页面配置' },
      },
    ],
  },
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'Login',
    hidden: true,
    meta: { title: '登录' },
  },
  {
    path: '/decorate',
    name: 'decorate',
    component: () => import('@/views/decorate/index'),
  },
]

export default new Router({ routes })
